<script setup lang="ts">
const {replacePath} = usePath()
const route = useRoute()
const code = route.params.code as String;
</script>

<template>
	<div style="height:100vh;display:flex;flex-direction:column; align-items: center; justify-content:center;">
	<a-result v-if="code==='401'" status="error" title="401 需要权限" sub-title="很抱歉，您需要登录并核验通过后才可访问~~" >
		<template #extra>
			<a-button key="buy">回上页</a-button>
			<a-button key="console" type="primary" @click="replacePath('/login')">重登录</a-button>
		</template>
	</a-result>
	<a-result v-if="code==='403'" status="403" title="403" sub-title="很抱歉，此处禁止通行哦~~">
		<template #extra>
			<a-button type="primary" @click="replacePath('/login')">重登录</a-button>
		</template>
	</a-result>
	<a-result v-if="code==='404'" status="404" title="404" sub-title="哎呀，你访问的页面迷失宇宙了~">
		<template #extra>
			<a-button type="primary" @click="replacePath('/chat/')">回首页</a-button>
		</template>
	</a-result>
	<a-result v-if="code==='500'" status="403" title="403" sub-title="很抱歉，此处禁止通行哦~~">
		<template #extra>
			<a-button type="primary" @click="replacePath('/login')">重登录</a-button>
		</template>
	</a-result>
	</div>
</template>

<style scoped lang="scss">

</style>